import request from '@/utils/request.js'

// 获取用户的所有频道列表
export const getUserChannels = () => {
  return request({
    method:'GET',
    url:'/app/v1_0/user/channels'
  })
}
// 获取所有的频道列表
export const getAllChannels = () => {
  return request({
    method:'GET',
    url:'/app/v1_0/channels'
  })
}
// 添加频道
export const addChannel = (channels) => {
  return request({
    method:'PATCH',
    url:'/app/v1_0/user/channels',
    data:{
      channels
    }
  })
}
// 删除指定的频道
export const deleteChannel = channelId => {
  return request({
    method:'DELETE',
    url:'/app/v1_0/user/channels/' + channelId
  })
}